package com.wms.wms.service.prouct;

import com.github.pagehelper.PageInfo;
import com.wms.wms.entity.Product;
import com.wms.wms.entity.Type;
import com.wms.wms.exception.*;
import com.wms.wms.vo.request.ProductRequestVO;

/**
 * @author Chl
 * @version 1.0
 * @date 2019/12/18 12:21
 */
public interface ProductService {

    Type selectTypeById(String id) throws NotFoundException;

    PageInfo<Type> selectTypeByName(String name, Integer start, Integer size) throws NotFoundException;

    PageInfo<Type> selectTypeAll(Integer start, Integer size) throws NotFoundException;

    void deleteTypeById(String id) throws CannotDeleteException, SystemException;

    void updateType(Type type) throws SystemException;

    void addType(Type type) throws AlreadyExistsException, SystemException;

    PageInfo<Product> selectProductByName(String name, Integer start, Integer size) throws NotFoundException;

    Product selectProductById(String id) throws NotFoundException;

    void updateProduct(ProductRequestVO vo) throws SystemException, ErrorTypeIdException;

    void addProduct(ProductRequestVO vo) throws SystemException, ErrorTypeIdException, AlreadyExistsException;

    void deleteProductById(String id) throws CannotDeleteException, SystemException;

}
